﻿using Deployment.Data.Environment;
using Deployment.Data.UI.Controls.Variable;
using Deployment.Data.Variable;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace Deployment.Data.UI.Dialogs.Variable
{
    public class VariableEditorDialog :AbstractDialog
    {

        
        public VariableEditorDialog(VariablesFile variables, EnvironmentsFile environmentsFile, AbstractVariable variable = null)
            : base("Variable Editor")
        {
            VariableEditorControl control = new VariableEditorControl();
            control.Variables = variables;
            control.Environments = environmentsFile;
            ContentControl = control;

        }

        public AbstractVariable newVariable
        {
            get
            {
                return (ContentControl as VariableEditorControl).newVariable;
            }
        }

        protected override bool performOkAction()
        {
            return true;
        }
    }
}
